// 预约tab切换
interface IRTabsProps {
  tabsItems?: {
    key: string
    name: string
    icon: string
    actIcon: string
  }[]
  actIndex: number;
  onClick?(e): void
} 
interface IRTabsData {

} 
interface IRTabsMethods {
  handleTap?(e): void
} 

Component<IRTabsData, IRTabsProps, IRTabsMethods>({
  data: {},
  props: {
    actIndex:0,
    tabsItems: [
      {
        key: 'staff',
        name: '员工预约',
        icon: '/images/tab-staff-icon.svg',
        actIcon: '/images/tab-staff-act-icon.svg'
      },
      // {
      //   key: 'staff',
      //   name: '服务预约',
      //   icon: '/images/tab-service-icon.svg',
      //   actIcon: '/images/tab-service-act-icon.svg'
      // },
      // {
      //   key: 'staff',
      //   name: '时间预约',
      //   icon: '/images/tab-time-icon.svg',
      //   actIcon: '/images/tab-time-act-icon.svg'
      // },
      
    ]
  },
  methods: {
    handleTap({target: {dataset: { index }}}) {
      const {actIndex} = this.props
      if (actIndex !== index) {
        this.props.onClick && this.props.onClick({index})
      }
    },
  }
});
